<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" enctype="multipart/form-data" method="post">
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">添加模板信息</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">模板名称 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="data[name]"
                                           value="" required>
                                </div>
                            </div>
							<input type="hidden" class="tpl-form-input" name="data[agent_id]" value="{$user['user']['user_id']}">
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">模板类型 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <select name="data[app_type]" required
                                            data-am-selected="{searchBox: 1, btnSize: 'sm',  placeholder:'请选择模板类型'}">
                                        <option value=""></option>
                                            {foreach $category as $item}
                                            <option value="{$item['app_type']}">{$item['name']}</option>
                                            {/foreach}
                                    </select>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">单门店购买价格 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <table class="am-table am-table-bordered">
										<tr>
											<th>一年</th>
											<th>二年</th>
											<th>三年</th>
											<th>四年</th>
											<th>五年</th>
										</tr>
										<tr>
											<td>
												<input type="hidden" name="data[buy_single][]" value="0">
												<input type="number" name="data[buy_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[buy_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[buy_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[buy_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[buy_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
										</tr>
									</table>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">单门店续费价格 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <table class="am-table am-table-bordered">
										<tr>
											<th>一年</th>
											<th>二年</th>
											<th>三年</th>
											<th>四年</th>
											<th>五年</th>
										</tr>
										<tr>
											<td>
												<input type="number" name="data[renew_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[renew_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[renew_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[renew_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[renew_single][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
										</tr>
									</table>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">多门店购买价格 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <table class="am-table am-table-bordered">
										<tr>
											<th>一年</th>
											<th>二年</th>
											<th>三年</th>
											<th>四年</th>
											<th>五年</th>
										</tr>
										<tr>
											<td>
												<input type="hidden" name="data[buy_many][]" value="0">
												<input type="number" name="data[buy_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[buy_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[buy_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[buy_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[buy_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
										</tr>
									</table>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">多门店续费价格 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <table class="am-table am-table-bordered">
										<tr>
											<th>一年</th>
											<th>二年</th>
											<th>三年</th>
											<th>四年</th>
											<th>五年</th>
										</tr>
										<tr>
											<td>
												<input type="number" name="data[renew_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[renew_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[renew_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[renew_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
											<td>
												<input type="number" name="data[renew_many][]" min="0" value="" class="am-field-valid ipt-w80" required>
											</td>
										</tr>
									</table>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">试用天数 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" min="0" class="tpl-form-input" name="data[trial_day]"
                                           value="30" required>
                                    <small>设置0不启用</small>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">备注说明 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="data[detail]"
                                           value="">
                                </div>
                            </div>							
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">显示排序 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="data[sort]"
                                           value="100" required>
                                    <small>数字越小越靠前</small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {

        $('#my-form').formPost();

    });
</script>
